<!--
 * @Description: 中心
 * @Author: 陈亮
 * @Date: 2022-03-18 16:56:11
 * @LastEditTime: 2024-03-01 11:12:12
 * @LastEditors: chenl
-->
<template>
  <div class="AMain">
    <keep-alive v-if="isKeepAlive">
      <router-view></router-view>
    </keep-alive>
    <router-view v-if="!isKeepAlive"></router-view>
  </div>
</template>

<script>
import { isKeepAlive } from '@/config';
export default {
  //import引入的组件需要注入到对象中才能使用
  components: {},
  data() {
    return {
      isKeepAlive: isKeepAlive,
    };
  },
  computed: {},
  watch: {},

  created() {},
  mounted() {},
  activated() {}, //如果页面有keep-alive缓存功能，这个函数会触发
};
</script>
<style lang="scss" scoped></style>
